using System;
using System.Collections.Generic;

namespace Agatha.ServiceLayer
{
    public class DataAccessException : Exception
    {
        private readonly List<string> _messages = new List<string>();

        public IEnumerable<string> Messages
        {
            get
            {
                return _messages;
            }
        }

        public DataAccessException()
        {
        }

        public DataAccessException(string message)
            : base(message)
        {
        }

        public DataAccessException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        public void AddMessage(string message)
        {
            _messages.Add(message);
        }
    }
}